home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13397 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  660 b 

  1. Path: orion.supernet.ab.ca!news
  2. From: lts@news.supernet.ab.ca (Len Starrenburg)
  3. Newsgroups: comp.lang.c
  4. Subject: Q: free() function
  5. Date: 7 Apr 1996 15:03:03 -0600
  6. Organization: Alberta SuperNet Inc
  7. Message-ID: <4k9ai7$rck@tibalt.supernet.ab.ca>
  8. NNTP-Posting-Host: tibalt.supernet.ab.ca
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. When dynamically allocating memory for a series of strings and storing 
  12. the addresses in a char pointer array, can all the allocated memory be 
  13. freed simply using "free(array)" or does "free(array[x])" have to be 
  14. executed for each pointer in the array.
  15.  
  16. I think the latter would be correct but I'm not 100% sure, please comment.
  17.  
  18. -lts
  19.